<?php
// +----------------------------------------------------------------------
// | sfadmin - Suifeng Administration
// +----------------------------------------------------------------------
// | Copyright (c) 2017-2020 http://suifeng.tech All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: suifeng <1787585212@qq.com>
// +----------------------------------------------------------------------

namespace app\admin\common;

class AdminException extends \Exception
{
    public function __construct ($message = null, $code = null, $previous = null)
    {
        parent::__construct($message, $code, $previous);
    }

    public function getString()
    {
        if ($this->code !== null) {
            return '[' . $this->code . '] ' . $this->message;
        } else {
            return $this->message;
        }
    }
}

